<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<nav th:fragment="common_menu" id="sidebar">
    <div class="sidebar-header d-flex align-items-center">
        <div class="avatar"><img th:src="@{/images/avatar.jpg}" alt="默存" class="img-fluid rounded-circle"></div>
        <div class="title">
            <h1 class="h5">默存</h1>
            <p>个人博客管理系统</p>
        </div>
    </div>
    <!-- 主菜单 -->
    <ul class="list-unstyled">
        <li th:classappend="${active == 'home'}?'active':''"><a href="home"> <i class="fa fa-home"></i>首页</a></li>
        <li th:classappend="${active == 'articleList'}?'active':''"><a href="articleList"> <i class="fa fa-list-ul"></i>文章列表</a></li>
        <li th:classappend="${active == 'userList'}?'active':''"><a href="userList"> <i class="fa fa-users"></i>用户列表</a></li>
        <li><a href="#type" aria-expanded="false" data-toggle="collapse"> <i class="fa fa-tags"></i>类型管理</a>
            <ul id="type" th:classappend="${active == 'typeList' || active == 'classifyList'}?'collapse list-unstyled show':'collapse list-unstyled'">
                <li th:classappend="${active == 'typeList'}?'active':''"><a href="typeList"> <i class="fa fa-folder-open"></i>文章分类</a></li>
                <li th:classappend="${active == 'classifyList'}?'active':''"><a href="classifyList"> <i class="fa fa-file"></i>文章类型</a></li>
            </ul>
        </li>
        <li th:classappend="${active == 'updPwd'}?'active':''"><a href="updPwd"> <i class="fa fa-cog"></i>修改密码</a></li>
    </ul>
</nav>